﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace cryptoXL
{
    public partial class frmNomeArquivo : Form
    {
        public string Nome { get; set; }

        public frmNomeArquivo()
        {
            InitializeComponent();
        }

        private void txtNomeChave_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (char.IsLetterOrDigit(e.KeyChar) || e.KeyChar == (char)Keys.Delete || e.KeyChar == '\b')
            {
                Nome = txtNomeChave.Text;
            }
            else if (e.KeyChar == (char)Keys.Return && txtNomeChave.TextLength > 0)
            {
                this.Close();
            }
            else
            {
                e.Handled = true;
            }
        }
    }
}
